package com.machuxin.course.patterns.decorator;

public class Test {

    public static void main(String[] args) {

        Pancake  pancake = new BasePancake();
        // 加一个鸡蛋
        pancake = new EggPancakeDecorator(pancake);
        // 再加一个鸡蛋
        pancake = new EggPancakeDecorator(pancake);
        // 讲一个香肠
        pancake = new SausagePancakeDecorator(pancake);

        System.out.println(pancake.getMsg()+"价格:"+ pancake.getPrice());
    }
}
